#import "GlimpseYieldController.h"
        
#import "GlimpseYieldModel.h"
#import "GlimpseYieldCell.h"
#import "Masonry.h"

@interface GlimpseYieldController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *xenonDelightfulSilhouetteCollectionView;
@property (nonatomic, strong) NSMutableArray *windfallSereneModels;

@end

@implementation GlimpseYieldController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self gratitudeImaginationSetupview];
	[self binaryHologramrequestData];
}


//: 获取数据模型
- (void)binaryHologramrequestData {
	
}

//: 初始化页面UI
- (void)gratitudeImaginationSetupview {
	[self.view addSubview:self.xenonDelightfulSilhouetteCollectionView];
	[self.xenonDelightfulSilhouetteCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.edges.equalTo(self.view);
	}];
}


//: 懒加载数据模型数组
- (NSMutableArray *)windfallSereneModels {
	if (!_windfallSereneModels) {
		_windfallSereneModels = [NSMutableArray array];
	}
	return _windfallSereneModels;
}

- (UICollectionView *)xenonDelightfulSilhouetteCollectionView {
    if (!_xenonDelightfulSilhouetteCollectionView) {
        UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
        flowLayout.minimumLineSpacing = 10;
        flowLayout.minimumInteritemSpacing = 10;
        flowLayout.itemSize = CGSizeMake(100, 100);
        flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
        
        _xenonDelightfulSilhouetteCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:flowLayout];
        _xenonDelightfulSilhouetteCollectionView.backgroundColor = UIColor.clearColor;
        _xenonDelightfulSilhouetteCollectionView.delegate = self;
        _xenonDelightfulSilhouetteCollectionView.dataSource = self;
        _xenonDelightfulSilhouetteCollectionView.showsHorizontalScrollIndicator = NO;
        _xenonDelightfulSilhouetteCollectionView.showsVerticalScrollIndicator = NO;
        [_xenonDelightfulSilhouetteCollectionView registerClass:[GlimpseYieldCell class] forCellWithReuseIdentifier:NSStringFromClass([GlimpseYieldCell class])];
    }
    return _xenonDelightfulSilhouetteCollectionView;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.windfallSereneModels.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    GlimpseYieldCell *melancholyQuest = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([GlimpseYieldCell class]) forIndexPath:indexPath];
    return melancholyQuest;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
